package com.advanced.commonlyUsedClass_2.packaging;

/**
 * 有一个字符串“Who Masters my own youth”，
 * 按照取方法名的规则进行转变。
 *
 * @author: Jovi
 * @createTime: 2017-06-06 16:29
 **/
public class ChangeString {

    public static void main(String[] args) {
        String strbefore = "Who Masters my own youth";
        String[] a = strbefore.split(" ");
        String joinString = a[0].toLowerCase();
        for (int i = 1; i < a.length; i++) {
            String s = a[i];
            joinString+=s.substring(0,1).toUpperCase();
            joinString+=s.substring(1).toLowerCase();
        }

        System.out.println(joinString);

    }
}
